package org.example.servlet;

import org.example.service.IEmployeeService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author 李新雨的项目86176
 * @version 1.0
 * @date 2024-11-09 11:26
 */
public class HelloServlet {
    ApplicationContext ctx = new ClassPathXmlApplicationContext("classpath:hello.xml");
    Object object = ctx.getBean("employeeService");
    private final IEmployeeService employeeService= ((IEmployeeService) object);

    public static void main(String[] args) {
        new HelloServlet().hello();
    }
    void hello(){
        employeeService.add();
    }

}
